package org.fangzz.cameramgr.cameramonitor.service.impl;

import org.fangzz.cameramgr.cameramonitor.model.Camera;
import org.fangzz.cameramgr.cameramonitor.repository.CameraRepository;
import org.fangzz.cameramgr.cameramonitor.service.CameraService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * created by XxChen 2018/6/22
 */


@Service
public class CameraServiceImpl implements CameraService {
    @Autowired
    CameraRepository cameraRepository;

    @Override
    public List<Camera> findByStoreId(Integer storeId) {
        return cameraRepository.findByStoreId(storeId);
    }

    @Override
    public Camera findById(Integer cameraId) {
        return cameraRepository.findById(cameraId).get();
    }
}
